let rec quickSort (list : int list) =
// https://docs.microsoft.com/zh-cn/dotnet/fsharp/language-reference/functions/recursive-functions-the-rec-keyword
    match list with
    // https://docs.microsoft.com/zh-cn/dotnet/fsharp/language-reference/match-expressions
    | []    ->  []
    | [single] -> [single]
    // 只有一个？ 就是不用排序吗
    | head :: tail ->
        let leftList = 
                tail
                    |> List.choose(fun item -> if item <= head then Some(item) else None)
                    // 获取所有比head小的 head是啥
                    //    high指针左移，直至遇到比pivotkey值小的记录，指针停止移动
                    // head 是指针吗 一直移动？
                    // http://data.biancheng.net/view/71.html
 
        let rightList = 
                tail
                    |> List.choose(fun item -> if item > head then Some(item) else None)
 
        quickSort(leftList) @ [head] @ quickSort(rightList)
 
let data =[3;2;1;5]
let r= quickSort(data);;